<?php
header('Content-Type: text/html; charset=UTF-8');
header('Cache-control: private'); // IE-6 fix

// Version
define('VERSION', '3.0.2');
define('PT_ACCESS', 1);

define('DEVELOPMENT_ENVIRONMENT', true);

//Define your Server
define('BASE_URL', 'http://' . $_SERVER['HTTP_HOST']);
define('ADMIN', 'PTadmin');

// Defualt language
define('DEFAULT_LANG', 'vn');

// Define the ROOT document
define('APP_ROOT', $_SERVER['DOCUMENT_ROOT'] . implode('/', array_slice(explode('/', $_SERVER['PHP_SELF']), 0, -2)) . '/');
define('DIR_APPLICATION', APP_ROOT . 'application/');
define('DIR_CONTROLLERS', APP_ROOT . 'application/controllers/');
define('ADMIN_CONTROLLERS', APP_ROOT . ADMIN . '/controllers/');
define('DIR_MODEL', APP_ROOT . 'application/model/');
define('DIR_MODEL_ADMIN', APP_ROOT . ADMIN . '/model/');
define('DIR_VIEW', APP_ROOT . 'application/views/');
define('DIR_SYSTEM', APP_ROOT . 'system/');
define('DIR_CONFIG', APP_ROOT . 'system/configs/');
define('DIR_LIBRARY', APP_ROOT . 'system/library/');
define('DIR_LANGUAGE', APP_ROOT . 'system/language/');
define('DIR_CACHE', APP_ROOT . 'tmp/cache/');
define('DIR_LOGS', APP_ROOT . 'tmp/logs/');
define('DS', DIRECTORY_SEPARATOR);

// Database
define('DATABASE', APP_ROOT . 'system/database/');

// Template
define('DIR_ADMIN_TEMPLATE', APP_ROOT . 'PTadmin/view/');
define('DIR_TEMPLATE', APP_ROOT . 'application/views/templates/');
define('ADMIN_THEME', '/PTadmin/');
define('THEME', '/default/');

// HTTP request
define('HTTP_ADMIN_REQUEST', BASE_URL . ADMIN_THEME . 'view/');
define('HTTP_REQUEST', BASE_URL . '/application/views/templates/' . THEME);

/* Application Environment:
 *
 * dev = development
 * prod = production
 */
define('APP_ENV', 'prod');

/* Smarty configuration */
define('SMARTY_CACHE', true);
define('SMARTY_CACHE_LIFE', 120);

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'default1234');
define('DB_DATABASE', '_ptcms');
define('DB_PREFIX', 'pro_');

// Config site
$config = array(
		'mod_rewrite'=>'on',
		'url_prefix'=>'.html' // URL Prefix
);